import 'dart:convert';

List<CategoryForSeries> categoryForSeriesFromJson(String str) =>
    List<CategoryForSeries>.from(
        json.decode(str).map((x) => CategoryForSeries.fromJson(x)));

String categoryForSeriesToJson(List<CategoryForSeries> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class CategoryForSeries {
  CategoryForSeries({
    this.id,
    this.mainCategory,
    this.image,
    this.text,
  });

  String? id;
  String? mainCategory;
  String? image;
  String? text;

  factory CategoryForSeries.fromJson(Map<String, dynamic> json) =>
      CategoryForSeries(
        id: json["id"],
        mainCategory: json["mainCategory"],
        image: json["image"],
        text: json["text"],
      );

  Map<String, dynamic> toJson() => {
        "id": id,
        "mainCategory": mainCategory,
        "image": image,
        "text": text,
      };
}
